package com.ny.demo92;

public class Car extends Bx {
    private int number;
    private double price;
    private double momey;

    public Car(int number, double price) {
        this.number = number;
        this.price = price;
    }

    @Override
    public double add() {
        if (number==0){
            momey=price*0.02;
        }
        return  momey;
    }
}
